﻿using RegExExercise;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace RegExTesting
{
    [TestClass()]
    public class RegularExpressionsExerciseTest
    {
        [TestMethod()]
        public void IsRealNumberMinusFive()
        {
            string number = "-5";
            bool expected = true;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void IsRealNumberZero()
        {
            string number = "0";
            bool expected = true;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void IsRealNumberRealDecimal()
        {
            string number = "0.56445644545";
            bool expected = true;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void IsRealNumberinvalidZero()
        {
            string number = "00";
            bool expected = false;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void IsRealNumberPesho()
        {
            string number = "Pesho";
            bool expected = false;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void IsRealNumberinvalidZero1()
        {
            string number = "00.0";
            bool expected = false;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void IsRealNumberDecimal()
        {
            string number = "00.565";
            bool expected = false;
            bool actual;
            actual = RegularExpressionsExercise.IsRealNumber(number);
            Assert.AreEqual(expected, actual);
        }
    }
}
